import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

export const constantRouterMap = [
  { path: '/userWel', component: () => import('@/views/photo/userWelcome'), hidden: true },
  { path: '/userProtocol', component: () => import('@/views/photo/userProtocol'), hidden: true },
  { path: '/userLogin', component: () => import('@/views/photo/userLogin'), hidden: true },
  { path: '/userHome', component: () => import('@/views/photo/userHome'), hidden: true },
  { path: '/userForgot', component: () => import('@/views/photo/userForgot'), hidden: true },
  { path: '/userRegister', component: () => import('@/views/photo/userRegister'), hidden: true },
  { path: '/userOrder', component: () => import('@/views/photo/userOrder'), hidden: true },
  { path: '/userShop', component: () => import('@/views/photo/userShop'), hidden: true },
  { path: '/userSubmitOrder', component: () => import('@/views/photo/userSubmitOrder'), hidden: true },
  { path: '/userCenter', component: () => import('@/views/photo/userCenter'), hidden: true },
  { path: '/userChangeInfo', component: () => import('@/views/photo/userChangeInfo'), hidden: true },
  { path: '/userChangePw', component: () => import('@/views/photo/userChangePw'), hidden: true },
  { path: '/userSuggest', component: () => import('@/views/photo/userSuggest'), hidden: true },

  { path: '/user/productDetails/:pid', component: () => import('@/views/photo/productDetails'), meta: { noCache: true }, hidden: true }
]

export default new Router({
  mode: 'history',
  scrollBehavior: () => ({ y: 0 }),
  routes: constantRouterMap
})
